package zuoye;

import java.util.ArrayList;
import java.util.Random;


public class menber extends user {
	public menber(String username,int money)
	{
		super(username,money);
	}
	public menber (){
		super();
	}
	public void receive(ArrayList<Integer> redList){
		if(redList.isEmpty()){
			return;
		}
		int index=new Random().nextInt(redList.size());
		Integer data=redList.remove(index);
		int money=this.getMoney()+data;
		this.setMoney(money);
	}
}
